ios 如何修复UICollectionView 您所在的位置:网站首页 nsrunloop run ios 如何修复UICollectionView

ios 如何修复UICollectionView

2023-04-15 03:32| 来源: 网络整理| 查看: 265

我正在开发一个SwiftUI应用程序。该应用程序不断崩溃,并显示以下错误消息:

UIKitCore:- [UICollectionView _validateScrollingTargetIndexPath:] + 412

我已经检查了Xcode的Organizer〉App〉Reports〉Crashes部分的崩溃日志,发现这是问题的根源,但我不明白。谁能帮助我了解导致此崩溃的原因以及如何修复它?我将感谢有关如何解决此问题的任何指导或建议。先谢谢你了!崩溃日志:

Incident Identifier: B57CBB49-CE6A-4F79-AD15-C8A81B66A8AC Hardware Model: iPhone12,1 Process: [APP_NAME] [42598] Path: /private/var/containers/Bundle/Application/739BA0B9-3014-4384-AC60-6A96A30472F1/[APP_NAME].app/[APP_NAME] Identifier: -- -- Version: 1.0.7 (2) AppStoreTools: 14C17 Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: -- -- [2646] Date/Time: 2023-03-16 18:50:43.5696 +0300 Launch Time: 2023-03-16 18:45:21.3862 +0300 OS Version: iPhone OS 16.0.2 (20A380) Release Type: User Baseband Version: 4.00.00 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x1c4d36248 __exceptionPreprocess + 164 (NSException.m:202) 1 libobjc.A.dylib 0x1be103a68 objc_exception_throw + 60 (objc-exception.mm:356) 2 Foundation 0x1bf6c281c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 188 (NSException.m:242) 3 UIKitCore 0x1c72a6e80 -[UICollectionView _validateScrollingTargetIndexPath:] + 412 (UICollectionView.m:0) 4 UIKitCore 0x1c72a665c -[UICollectionView _contentOffsetForScrollingToItemAtIndexPath:atScrollPosition:] + 52 (UICollectionView.m:7348) 5 UIKitCore 0x1c72a6078 -[UICollectionView _scrollToItemAtIndexPath:atScrollPosition:animated:] + 240 (UICollectionView.m:7563) 6 SwiftUI 0x1c9045e38 PagingCollectionView.scrollToItem(at:at:animated:) + 320 (PageView_PhoneTV.swift:607) 7 SwiftUI 0x1c9045f24 @objc PagingCollectionView.scrollToItem(at:at:animated:) + 208 (:0) 8 SwiftUI 0x1c86b09dc PagingCollectionView.layoutSubviews() + 988 (PageView_PhoneTV.swift:595) 9 SwiftUI 0x1c86af9e8 @objc PagingCollectionView.layoutSubviews() + 36 (:0) 10 UIKitCore 0x1c6ebecec -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1980 (UIView.m:18550) 11 QuartzCore 0x1c639b4e8 CA::Layer::layout_if_needed(CA::Transaction*) + 500 (CALayer.mm:10223) 12 QuartzCore 0x1c63aeb9c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 148 (CALayer.mm:2516) 13 QuartzCore 0x1c63c0098 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 456 (CAContextInternal.mm:2711) 14 QuartzCore 0x1c63f73c4 CA::Transaction::commit() + 652 (CATransactionInternal.mm:431) 15 QuartzCore 0x1c63de408 CA::Transaction::flush_as_runloop_observer(bool) + 88 (CATransactionInternal.mm:939) 16 CoreFoundation 0x1c4dbe070 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36 (CFRunLoop.c:1806) 17 CoreFoundation 0x1c4d46690 __CFRunLoopDoObservers + 532 (CFRunLoop.c:1919) 18 CoreFoundation 0x1c4da7f8c __CFRunLoopRun + 1048 (CFRunLoop.c:2998) 19 CoreFoundation 0x1c4dad1e4 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390) 20 GraphicsServices 0x1fdbcd368 GSEventRunModal + 164 (GSEvent.c:2196) 21 UIKitCore 0x1c725cd88 -[UIApplication _run] + 888 (UIApplication.m:3726) 22 UIKitCore 0x1c725c9ec UIApplicationMain + 340 (UIApplication.m:5316) 23 SwiftUI 0x1c885bce8 closure #1 in KitRendererCommon(_:) + 168 (UIKitApp.swift:37) 24 SwiftUI 0x1c87b8c24 runApp(_:) + 152 (:0) 25 SwiftUI 0x1c87a1b44 static App.main() + 128 (App.swift:114) 26 [APP_NAME] 0x10418bb94 static [APP_NAME]App.$main() + 52 ([APP_NAME]App.swift:14) 27 [APP_NAME] 0x10418bb94 main + 64 (MainView.swift:0) 28 dyld 0x1e30d1948 start + 2504 (dyldMain.cpp:1168) Kernel Triage: VM - pmap_enter retried due to resource shortage Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x000000020141e200 __pthread_kill + 8 (:-1) 1 libsystem_pthread.dylib 0x000000021165b1ac pthread_kill + 268 (pthread.c:1670) 2 libsystem_c.dylib 0x00000001cc26d3f4 __abort + 128 (abort.c:155) 3 libsystem_c.dylib 0x00000001cc215cac abort + 192 (abort.c:126) 4 libc++abi.dylib 0x000000021159db8c abort_message + 132 (abort_message.cpp:78) 5 libc++abi.dylib 0x000000021158da80 demangling_terminate_handler() + 336 (cxa_default_handlers.cpp:71) 6 libobjc.A.dylib 0x00000001be109eec _objc_terminate() + 144 (objc-exception.mm:498) 7 [APP_NAME] 0x000000010490cfd8 FIRCLSTerminateHandler() + 340 (FIRCLSException.mm:452) 8 libc++abi.dylib 0x000000021159cf28 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59) 9 libc++abi.dylib 0x000000021159fecc __cxa_rethrow + 148 (cxa_exception.cpp:616) 10 libobjc.A.dylib 0x00000001be105854 objc_exception_rethrow + 44 (objc-exception.mm:401) 11 CoreFoundation 0x00000001c4dad2a8 CFRunLoopRunSpecific + 808 (CFRunLoop.c:3406) 12 GraphicsServices 0x00000001fdbcd368 GSEventRunModal + 164 (GSEvent.c:2196) 13 UIKitCore 0x00000001c725cd88 -[UIApplication _run] + 888 (UIApplication.m:3726) 14 UIKitCore 0x00000001c725c9ec UIApplicationMain + 340 (UIApplication.m:5316) 15 SwiftUI 0x00000001c885bce8 closure #1 in KitRendererCommon(_:) + 168 (UIKitApp.swift:37) 16 SwiftUI 0x00000001c87b8c24 runApp(_:) + 152 (:0) 17 SwiftUI 0x00000001c87a1b44 static App.main() + 128 (App.swift:114) 18 [APP_NAME] 0x000000010418bb94 static [APP_NAME]App.$main() + 52 ([APP_NAME]App.swift:14) 19 [APP_NAME] 0x000000010418bb94 main + 64 (MainView.swift:0) 20 dyld 0x00000001e30d1948 start + 2504 (dyldMain.cpp:1168) Thread 1 name: Thread 1: 0 libsystem_kernel.dylib 0x0000000201419480 kevent + 8 (:-1) 1 [APP_NAME] 0x00000001044fdc84 realm::_impl::ExternalCommitHelper::listen() + 160 (external_commit_helper.cpp:219) 2 [APP_NAME] 0x00000001044fde64 realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&, realm::RealmConfig const&)::$_0::operator()() const + 4 (external_commit_helper.cpp:175) 3 [APP_NAME] 0x00000001044fde64 decltype(static_cast(fp)()) std::__1::__invoke


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

      专题文章
        CopyRight 2018-2019 实验室设备网 版权所有